﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Sripirom.Pattern.UnitTest.Simple
{
    public class SimpleClass : Sripirom.Pattern.UnitTest.Simple.ISimpleClass
    {
        public Int32 Plus(Int32 obj1, Int32 obj2)
        {
            return obj1 + obj2;
        }


        public SimpleResponse Invoke(SimpleRequest request)
        {
            return new SimpleResponse()
            {
                Id = request.Id,
                Name = request.Name,
                Data = new DataResponse() { 
                    Code = request.Data.Code,
                    CodeName = request.Data.CodeName
                }
            };
        }
    }


    public class SimpleRequest
    {
        public Int32 Id { get; set; }
        public String Name { get; set; }

        public DataRequest Data { get; set; }
    }

    public class DataRequest
    {
        public Int32 Code { get; set; }
        public String CodeName { get; set; }
    }

    public class SimpleResponse
    {
        public Int32 Id { get; set; }
        public String Name { get; set; }

        public DataResponse Data { get; set; }
    }

    public class DataResponse
    {
        public Int32 Code { get; set; }
        public String CodeName { get; set; }
    }
}
